home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 34.zip
/
BS1 part 34
/
FredFish PD 316.adf
/
SmartIcon
/
src
/
romtraps.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-02-06
|
974b
|
51 lines
#include <exec/types.h>
#include <intuition/intuition.h>
#include <intuition/intuisup.h>
#include "patch.h"
extern struct Window *theEventWindow;
extern ULONG PatchSignal;
extern struct Task *PatchTask;
VOID
MyOpenWindow(window)
register struct Window *window;
{
PatchWindow(window);
}
VOID
MyCloseWindow(window)
register struct Window *window;
{
register struct WindowPatch *p;
Forbid();
if (p = (struct WindowPatch *)FindWPatch(window))
UnPatchWindow(p, FALSE);
Permit();
}
BYTE
MyPutMsg(port, msg)
register struct MsgPort *port;
register struct IntuiMessage *msg;
{
if (msg->Class==GADGETUP || msg->Class==GADGETDOWN)
{
register USHORT id = ((struct Gadget *)(msg->IAddress))->GadgetID;
if (id==ICONGADGET)
{
theEventWindow = msg->IDCMPWindow;
Signal(PatchTask, 1 << PatchSignal);
ReplyMsg(msg);
return(1);
}
}
return(0);
}